package com.app.mymusic.test.dagger2;

import android.util.Log;

/**
 * Created by Administrator on 2016/11/29.
 */

public class DaggerPresenter {
    private DaggerActivity a;
    private User user;
    private UserModel userModel;

    public DaggerPresenter(DaggerActivity a,User user) {
        this.a = a;
        this.user=user;
        userModel=new UserModel();
    }
    public void showName(String name){
        a.showName(name);
    }

    public void request(User user) {
        Log.d("CCC",user.getName());
        userModel.getUsers(1,true, new GetCallback() {
            @Override
            public void sucess() {
                a.showSSSSS();
            }
            @Override
            public void error() {
                a.showEEEE();
            }
        });
    }

    public interface GetCallback{
        void sucess();
        void error();
    }
}

